<!DOCTYPE html>
<html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue Template</title>
</head>
<body>
    <template id="cpn">
        <div>
            {{cmovies}}
            {{cmessage}}
        </div>
    </template>
    <div id="app">
        <cpn :cmovies="movies" :cmessage="message"></cpn>
    </div>
<script src="../js/vue.js"></script>
<script>

    const cpn = {
        template:'#cpn',
        // props:['cmovies','cmessage'],
        props:{
            cmovies: Array,
            cmessage: String
        },
        data(){
            return {}
        }
    }

    const app = new Vue({
        el: '#app',
        data: {
            message: 'hello Vue!',
            movies: ['海王','海贼王','海尔兄弟']
        },
        components:{
            cpn
        }
    })
</script>
</body>
</html>